package com.example.materialcostsystembackend.repository;

import com.example.materialcostsystembackend.model.Part;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface PartRepository extends JpaRepository<Part, Long> {
    // 按名称 + 规格查找唯一的零件
    Optional<Part> findByNameAndSpecification(String name, String specification);
}

